import Http, {HttpParamsProps, ReqProps} from "@/common/http";
import {BaseEntity} from "@/common/httptypes";


export type EntityFeeListModel = {
    id: number
    amount: number
    fee: number
} & BaseEntity


class EntityFeeList {
    RowKey = "id"
    EDIT = "feeListEdit"
    ADD = "feeListAdd"
    DEL = "feeListDel"
    MAPPING = {feeListEdit: "编辑收费", feeListAdd: "新增收费"}


    selectTablePage(props: HttpParamsProps): Promise<Response> {
        return Http.get("/api/feeList/page", props)
    }

    selectById(props: ReqProps<EntityFeeListModel>) {
        Http.doGet("/api/feeList/find", props)
    }

    doEdit(props: ReqProps<void>) {
        Http.doPost("/api/feeList/edit", props)
    }

    delete(props: ReqProps<void>) {
        Http.doPost("/api/feeList/delete", props)
    }

}

// eslint-disable-next-line import/no-anonymous-default-export
export default new EntityFeeList()